package com.tfjybj.itoo.exam.provider.service.impl;

import com.dmsdbj.itoo.tool.base.service.impl.BaseServicePlusImpl;
import com.dmsdbj.itoo.tool.business.ItooResult;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.exam.entity.ExamRoomEntity;
import com.tfjybj.itoo.exam.entity.ExamineeEntity;
import com.tfjybj.itoo.exam.model.*;
import com.tfjybj.itoo.exam.provider.dao.ExamineeDao;
import com.tfjybj.itoo.exam.provider.service.*;
import com.tfjybj.itoo.exam.provider.until.MutliStyleExcelUtil;
import com.tfjybj.itoo.exam.template.StudentScoreTemp;
import lombok.extern.slf4j.Slf4j;
import org.jplus.hyberbin.excel.utils.ExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;

import static com.tfjybj.itoo.exam.provider.until.DemoConstants.*;

/**
 * ExamineeService接口实现类
 * ${base}表
 *
 * @author 任晓帅
 * @version 2.0.0
 * @since 2.0.0 2018-11-15 19:40:28
 */
@Service("examineeService")
@Slf4j
public class ExamineeServiceImpl extends BaseServicePlusImpl<ExamineeDao, ExamineeEntity> implements ExamineeService {


    @Resource
    private ExamineeDao examineeDao;
    @Resource
    private StudentService studentService;

    @Resource
    private ClassService classService;

    @Resource
    private ProfessionService professionService;

    @Resource
    private AcademyService academyService;
    @Resource
    private ExamRoomService examRoomService;

    @Override
    public PageInfo<ExamineeEntity> queryByLikeStudentName(String studentName, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(examineeDao.queryLikeStudentName(studentName));
    }


    //endregion

    /* **********************************以下为非模板生成的内容********************************* */


    /**
     * 根据学生姓名模糊查询考生信息
     *
     * @param studentName
     * @return 班级本场考试所有成绩
     * @authror 谢妞
     * @since 2018年12月14日19:23:16
     */
    @Override
    public List<ExaminationModel> queryExamineLikeName(String studentName, String classId, String examId) {
        String test = "%" + studentName + "%";

        List<ExaminationModel> examinationModelArrayList;
        //查询此班级所有和stduentScore相似学生
        List<ExaminationModel> examinationModels = examineeDao.queryExamineLikeNameNoScore(classId, test, examId);
        //模糊查询学生成绩
        List<ExaminationModel> examStduentScoreList = examineeDao.queryExamineLikeName(test, classId, examId);
        //在班级中筛选所有符合模糊查询的条件studentName的数据,放进examinationList
        for (ExaminationModel examinationModel : examinationModels) {
            //从学生成绩中查找当前循环的学生
            Optional<ExaminationModel> examination = examStduentScoreList.stream().filter(e -> e.getStudentId().equals(examinationModel.getStudentId())).findAny();
            //如果当前循环的学生不在学生成绩中,添加到学生成绩的list中,如果在继续循环
            if (!examination.isPresent()) {
                examinationModel.setStudentScore("0");
                examinationModel.setStatus("可能已经判分,但尚未汇总分数");
                examStduentScoreList.add(examinationModel);
            }
        }
        examinationModelArrayList = examStduentScoreList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ExaminationModel::getStudentScore))), ArrayList::new));
        return examinationModelArrayList;
    }

    /**
     * 根据考试班级ID和考试ID分页查询考生-已经完成
     *
     * @param classId
     * @param examId
     * @author 谢妞
     * @since 2018-11-24
     */
    @Override
    public List<ExaminationModel> queryPageExamineeByClassId(String classId, String examId) {
        //查询考试下班级所有学生
        List<ExaminationModel> examinationModels = examineeDao.queryExamineeByClassIdExamIdNoScore(classId, examId);
        //查询成绩表该班级的考生
        List<ExaminationModel> examinationModelList = examineeDao.queryClassScore(classId, examId);
        for (ExaminationModel examinationModel : examinationModels) {

            //从学生成绩中查找当前循环的学生
            Optional<ExaminationModel> examination = examinationModelList.stream().filter(e -> e.getStudentId().equals(examinationModel.getStudentId())).findAny();
            //如果当前循环的学生不在学生成绩中,添加到学生成绩的list中,如果在继续循环
            if (!examination.isPresent()) {
                examinationModel.setStudentScore("0");
                examinationModel.setStatus("缺考");
                examinationModelList.add(examinationModel);
            }

        }
        return examinationModelList;

    }

    /**
     * 根据班级id和考试id批量导出班级所有学生成绩
     *
     * @param response
     * @param exportList
     * @return 班级本场考试所有成绩
     * @authror 谢妞
     * @since 2018年12月14日19:23:16
     */
    @Override
    public ItooResult exportComplexByClassIdExamId(HttpServletResponse response, List<ExaminationModel> exportList) {

        response.setContentType("UTF-8");

        Map<Serializable, Serializable> map = new HashMap<>(16);
        //日期转换字符串格式
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
        map.put(SHEET_NAME, "班级成绩信息");
        //要导出的字段
        map.put(COLUMNS, new String[]{"studentCode", "studentName", "className", "examName", "startTime", "endTime", "studentScore"});
        //导出表格的标题
        map.put(TITLE, "班级成绩信息");
        map.put(NAME, "班级成绩信息");
        //要导出的数据
        List<StudentScoreTemp> classScoreTemplates = new ArrayList<>();
        // 根据班级id和考试id批量查询班级所有学生成绩
        List<ExaminationModel> calssScoreModel = this.queryExamineeInfo(exportList);

        // 绑定导出模板的字段数据
        for (ExaminationModel model : calssScoreModel) {
            StudentScoreTemp studentScoreTemp = new StudentScoreTemp();
            BeanUtils.copyProperties(model, studentScoreTemp);
            studentScoreTemp.setStudentName(model.getStudentName());
            studentScoreTemp.setStudentCode(model.getStudentCode());
            studentScoreTemp.setClassName(model.getClassName());
            studentScoreTemp.setExamName(model.getExamName());
            if (model.getStudentScore().equals("-1")) {
                studentScoreTemp.setStudentScore("0");
            }
            studentScoreTemp.setStartTime(simpleDateFormat.format(model.getStartTime()));
            studentScoreTemp.setEndTime(simpleDateFormat.format(model.getEndTime()));
            classScoreTemplates.add(studentScoreTemp);
        }
        //为空不进行导出
        if (classScoreTemplates.size() == 0) {
            return ItooResult.build(ItooResult.FAIL, "没有要导出的数据");
        }
        map.put(DATA_LIST, (Serializable) classScoreTemplates);

        //导出
        try {
            ExcelUtil.exportExcel(map, response);
        } catch (Exception e) {
            log.error("导出失败，未知的异常--" + e);
            return ItooResult.build(ItooResult.FAIL, "导出信息失败！");
        }
        return ItooResult.build(ItooResult.SUCCESS, "导出信息成功");

    }


    /**
     * 根据班级id和考试id批量查询班级所有学生成绩
     *
     * @param exportList
     * @return 班级本场考试所有成绩
     * @authror 谢妞
     * @since 2018年12月14日19:23:16
     */
    @Override
    public List<ExaminationModel> queryExamineeInfo(List<ExaminationModel> exportList) {
        // 在成绩表中查询所有的该班级的考生
        List<ExaminationModel> examinationModels = examineeDao.queryExamineeInfo(exportList);

        // 在班级表中查询所有考生
        List<ExaminationModel> modelList = examineeDao.queryExamnieByClass(exportList);

        //循环对比,对没有成绩的学生赋予0，状态设为缺考
        for (ExaminationModel list : modelList) {
            Optional<ExaminationModel> modelOptional = examinationModels.stream().filter(x -> x.getStudentId().equals(list.getStudentId())).findAny();
            // 如果当前循环的学生不在modelOptional中
            if (!modelOptional.isPresent()) {
                list.setStudentScore("0");
                list.setStatus("缺考");
                examinationModels.add(list);
            }
        }
        return examinationModels;
    }


    /**
     * 根据班级id和考试id查询考生
     *
     * @param classId
     * @param examId
     * @author 谢妞
     * @since 2018-11-28
     */
    @Override
    public List<ExaminationModel> queryExamineByClassIdNoPpage(String classId, String examId) {
        List<ExaminationModel> examinationModels = examineeDao.queryExamineeByClassIdExamId(classId, examId);
        return examinationModels;
    }

    /**
     * 导出单个班级的成绩信息
     *
     * @param classId
     * @param examId
     * @author 谢妞
     * @since 2018-11-28
     */
    @Override
    public ItooResult exportSingleScore(HttpServletResponse response, String classId, String examId) {
        response.setContentType("UTF-8");
        Map<Serializable, Serializable> map = new HashMap<>(16);
        //日期转换字符串格式
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
        map.put(SHEET_NAME, "班级成绩信息");
        //要导出的字段
        map.put(COLUMNS, new String[]{"studentCode", "studentName", "className", "examName", "startTime", "endTime", "studentScore"});
        //导出表格的标题
        map.put(TITLE, "班级成绩信息");
        //要导出的数据
        List<StudentScoreTemp> classScoreTemplates = new ArrayList<>();
        List<ExaminationModel> classScoreModel = this.queryPageExamineeByClassId(classId, examId);

        map.put(NAME, "班级成绩信息");
        for (ExaminationModel model : classScoreModel) {
            StudentScoreTemp studentScoreTemp = new StudentScoreTemp();
            BeanUtils.copyProperties(model, studentScoreTemp);
            studentScoreTemp.setStudentName(model.getStudentName());
            studentScoreTemp.setStudentCode(model.getStudentCode());
            studentScoreTemp.setClassName(model.getClassName());
            studentScoreTemp.setExamName(model.getExamName());
            if (model.getStudentScore().equals("-1")) {
                studentScoreTemp.setStudentScore("0");
            }
            studentScoreTemp.setStartTime(simpleDateFormat.format(model.getStartTime()));
            studentScoreTemp.setEndTime(simpleDateFormat.format(model.getEndTime()));
            classScoreTemplates.add(studentScoreTemp);
        }
        //为空不进行导出
        if (classScoreTemplates.size() == 0) {
            return ItooResult.build(ItooResult.FAIL, "没有要导出的数据");
        }
        map.put(DATA_LIST, (Serializable) classScoreTemplates);

        //导出
        try {
            ExcelUtil.exportExcel(map, response);
        } catch (Exception e) {
            log.error("导出失败，未知的异常--" + e);
            return ItooResult.build(ItooResult.FAIL, "导出信息失败！");
        }
        return ItooResult.build(ItooResult.SUCCESS, "导出信息成功");


    }

    /**
     * 根据考试ID和考场ID查询考场下所有学生
     *
     * @param examId,examRoomId
     * @return ExamineeReachClassModel
     * @author 任晓帅
     * @since 2.0.0      2019年5月21日15:20:45
     */
    @Override
    public List<ExamineeReachClassModel> queryExamStudent(String examId, String examRoomId) {
        if (StringUtils.isEmpty(examId) || StringUtils.isEmpty(examRoomId)) {
            return null;
        }
        return examineeDao.queryExamStudent(examId, examRoomId);
    }

    /**
     * 查询当前考场下所有缺考学生
     *
     * @param examId examRoomId
     * @return ExamineeReachClassModel
     * @author 王雪芬 任晓帅
     * @since 2.0.0        2018-11-19 12:16:03  2019年5月21日17:14:04
     */
    @Override
    public List<ExamineeModel> queryExamStudentNologin(String examId, String examRoomId) {
        if (StringUtils.isEmpty(examId) || StringUtils.isEmpty(examRoomId)) {
            return null;
        }
        return examineeDao.queryExamStudentNologin(examId, examRoomId);
    }

    /**
     * @param examId String
     * @return 根据考试id查出本场考试所有考生
     * @author maying
     * @since 2018年11月17日11:23:36
     */
    @Override
    public List<ExamineeModel> selAllExaminee(String examId) {
        return examineeDao.selAllExaminee(examId);
    }

    /**
     * @param examId
     * @return 根据考试id删除本场考试所有考生
     * @author maying
     * @since 2018年11月18日10:12:23
     */
    @Override
    public int arrayDelExaminee(String examId) {
        return examineeDao.delExamineeArray(examId);
    }

    @Override
    public boolean insertExaminee(ExamineeModel examineeModel) {
        ExamineeEntity examine = new ExamineeEntity();
        BeanUtils.copyProperties(examineeModel, examine);
        return this.save(examine);
    }


    @Override
    public ExamineeEntity queryExamExamineeInfo(String examineeId) {
        return examineeDao.queryExamExamineeInfo(examineeId);
    }

    @Override
    public List<ExamineeEntity> queryExamStudentExaminee(String studentId, String exameeId) {
        return examineeDao.queryExamStudentExaminee(studentId, exameeId);
    }

    @Override
    public List<ClassModel> selExamClass(String examId) {
        return examineeDao.selExamClass(examId);
    }

    /**
     * 根据考试低查询考试下面所有的考生
     *
     * @param examinationId 考试id
     * @return 考生集合
     * @author 马莹
     * @since 2018-12-29 21:25:34
     */
    @Override
    public List<ExamineeModel> selNotExamStudentInfo(String examinationId) {
        return examineeDao.queryNotExamStudent(examinationId);
    }

    @Override
    public List<ExamineeModel> fuzzyQuery(String examineeName, String examinationId) {
        return examineeDao.fuzzyQuery(examineeName, examinationId);
    }


    /**
     * 根据班级集合查询这个班级集合下面所有的学生
     *
     * @param classList   班级集合
     * @param examationId 考试id
     * @param operatorId  操作人id
     * @param fuzzyValue  模糊查询条件
     * @return 学生集合以班级为单位
     * @since 2018-12-22 11:08:12
     * author 马莹
     */
    @Override
    public List<ExamineeModel> selectStudentList(List<String> classList, String examationId, String operatorId, String fuzzyValue) {
        return examineeDao.selectStudentList(classList, examationId, operatorId, fuzzyValue);
    }

    /**
     * 根据考试id更新考试时长
     *
     * @param examId       考试id
     * @param examDuration 考试时长
     * @author 马莹
     * @since 2018-12-24 20:26:26
     */
    @Override
    public boolean updateExamineeInfomation(String examId, Integer examDuration) {
        return examineeDao.updateExamineeInfomation(examId, examDuration);
    }

    @Override
    public List<ExamineeEntity> queryExamStudentEndTime(String studentId) {
        return examineeDao.queryExamStudentEndTime(studentId);
    }


    @Override
    public List<ExaminOnlineModel> queryExamExaminee(String studentId) {
        return examineeDao.queryExamExaminee(studentId);
    }


    /**
     * 根据学生id查询差生信息,以及考试信息
     *
     * @param beginTime 考试开始时间
     * @param studentId 学生id
     * @param overTime  考试结束时间
     * @return 冲突考试的集合
     * @author 马莹
     * @since 2018-12-28 21:38:44
     */
    @Override
    public List<ExaminationModel> selectExaminee(String beginTime, String overTime, String studentId) {

        // 1,根据学生id查询考生信息
        return examineeDao.selectExaminee(beginTime, overTime, studentId);

    }

    /**
     * 查询考场总人数
     *
     * @param examRoomId
     * @return
     * @author 于云秀
     * @since 2018年12月29日10:33:40
     */
    @Override
    public List<ExamineeEntity> selExamRoomStudentCount(String examRoomId, String examId) {
        return examineeDao.selExamRoomStudentCount(examRoomId, examId);
    }

    /**
     * 通过考试id查询获取考场的个数
     *
     * @param examId 考试id
     * @return 考场的集合
     * @author 马莹
     * @since 2019-1-3 20:24:13
     */
    @Override
    public List<ExamRoomEntity> selectExamineeInExamRoom(String examId) {
        return examineeDao.selectExamineeInExamRoom(examId);
    }

    /**
     * 根据考试id查询考试的考生人数
     *
     * @param examId 考试id
     * @return 考生集合
     * @author 马莹
     * @since 2019-1-3 20:41:03
     */
    @Override
    public List<ExamineeModel> selectCountExaminee(String examId) {
        return examineeDao.selectCountExaminee(examId);
    }

    @Override
    public List<ExamineeEntity> examOnlineExamineeState() {
        return examineeDao.examOnlineExamineeState();
    }

    @Override
    public int updateExamineeStatus(List<ExamineeEntity> examineeEntityList) {
        return examineeDao.updateExamineeStatus(examineeEntityList);
    }

    /**
     * 导出Excel表格,分sheet,自定义表头
     *
     * @param examIdList 考试集合
     * @param request
     * @param response
     * @author 马莹
     * @since 2019-1-6 14:47:46
     */
    @Override
    public void customExportExcel(List<String> examIdList, HttpServletRequest request, HttpServletResponse response) {
        List<ExamExamRoomListModel> newInfomation = new ArrayList<>();
        List<ExamExamRoomListModel> examExamRoomListModelList = examRoomService.selectExamAndExamRoomInfomation(examIdList);
        examExamRoomListModelList.forEach(examExamRoomListModel -> {
            ExamExamRoomListModel exam = new ExamExamRoomListModel();
            examExamRoomListModel.setExamRoomName(examExamRoomListModel.getExamRoomName().substring(0, examExamRoomListModel.getExamRoomName().indexOf("-")));
            List<ExamExamineeListModel> examExamineeListModels = examineeDao.selectExamineeInfomation(examExamRoomListModel.getExamId(), examExamRoomListModel.getExamRoomId());
            BeanUtils.copyProperties(examExamRoomListModel, exam);
            exam.setChildList(examExamineeListModels);
            newInfomation.add(exam);
        });

        try {
            //在excel中的第3行每列的参数
            String[] head0 = new String[]{"考试时间", "考试时间", "考试时间", "考试时间", "考试时间", "地点", "地点", "地点", "考生人数", "考生人数",
            };
            //在excel中的第4行每列（合并列）的参数
            String[] head1 = new String[]{"姓名", "学号", "班级", "座位号", "学生签名", "姓名", "学号", "班级", "座位号", "学生签名",};
            //对应excel中的行和列，下表从0开始{"开始行,结束行,开始列,结束列"}
            String[] headnum0 = new String[]{"2,2,1,5", "2,2,6,8", "2,2,9,10"};
            //需要显示在excel中的参数对应的值，因为是用map存的，放的都是对应的key
            String[] colName = new String[]{"NameOne", "stuCodeOne",
                    "classOne", "seatNumberOne", "studentSignatureOne", "NameTwo", "stuCodeTwo", "classTwo", "seatNumberTwo", "studentSignatureTwo"};
            //utils类需要用到的参数
            MutliStyleExcelUtil.reportMergeXls(request, response, newInfomation, head0,
                    headnum0, head1, colName);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static String FILE_TEMPLATE = "templates/signup-template.xlsx";

//    public void exportExcelUseEasyExcel(List<ExamExamRoomListModel> newInformation,HttpServletResponse response){
//        if (CollectionUtils.isEmpty(newInformation)){
//            return;
//        }
//        //1.获取表头数据
//        Map<String,Object> header = new HashMap<>(4);
//        ExamExamRoomListModel examExamRoomListModel = newInformation.get(0);
//        header.put("examName",examExamRoomListModel.getExamName());
//        header.put("examDate",examExamRoomListModel.getExamDate());
//        header.put("examTimeSlot",examExamRoomListModel.getExamTimeSlot());
//        header.put("examRoomName",examExamRoomListModel.getExamRoomName());
//        header.put("stuNames",examExamRoomListModel.getChildList().size());
//
//        //2.拿出表体数据
//        List<ExamExamineeListModel> childList = examExamRoomListModel.getChildList();
//
//        InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(FILE_TEMPLATE);
//
//        //3.web返回
//        response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
//        response.setCharacterEncoding("utf-8");
//        // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
//        try {
//            String fileName = URLEncoder.encode("学生登记表", "UTF-8").replaceAll("\\+", "%20");
//            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
//            EasyExcel.write(response.getOutputStream())
//                    .withTemplate(resourceAsStream)
//                    .sheet(0).doFill(childList);
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }

    @Override
    public int ifSummaryScore(String examId, String classId) {
        List<ExaminationModel> list = examineeDao.ifSummaryScore(examId, classId);
        if (list.size() > 0) {
            return 1;
        } else {
            return 0;
        }
    }

    @Override
    /**
     * 根据教师id校验人数
     * @param operator
     * @author 谢妞
     * @since 2019年1月20日08:30:16
     */
    public List<ExaminationModel> checkExamine(String operator) {
        List<ExaminationModel> examinationModels = examineeDao.checkExamine(operator);
        return examinationModels;
    }

    @Override
    /**
     * 根据教师id查看缺考信息
     * @param operator
     * @author 谢妞
     * @since 2019年1月22日16:07:19
     */
    public List<ExaminationModel> checkLack(String operator) {
        List<ExaminationModel> examinationModels = examineeDao.checkLack(operator);
        return examinationModels;
    }

    @Override
    /**
     * 根据教师id查看没有成绩的学生
     * @param operator
     * @author 谢妞
     * @since 2019年1月22日16:38:03
     */
    public List<ExaminationModel> checkNoScore(String operator, Integer type) {
        List<ExaminationModel> examinationModels = new ArrayList<>();
        if (type == 0) {
            examinationModels = examineeDao.checkNoScore(operator);
        }
        if (type == 1) {
            examinationModels = examineeDao.checkNoPaperRecord(operator);
        }
        return examinationModels;
    }

    @Override
    /**
     * 根据考生id和班级id查询各章节得分率60%以上人数
     * @param classId
     * @param examId
     * @author a孙博雅
     * @sinces 2019年3月3日19:34:14
     */
    public List<ExaminationModel> querychapternumbe(String classId, String examId, String examineeId) {
        List<ExaminationModel> examinationModels = examineeDao.querychapternumbe(classId, examId, examineeId);


        return examinationModels;
    }


    /**
     * 根据班级id和考试id查询考生id
     *
     * @param classId
     * @param examId
     * @author 孙博雅
     * @sinces 2019年3月3日19:34:14
     */
    public List<ExaminationModel> queryStudent(String classId, String examId) {
        return examineeDao.queryStudent(classId, examId);
    }

    @Override
    public List<ExamineeModel> queryExaminee(String examStartTime) {
        return examineeDao.queryExaminee(examStartTime);
    }

    @Override
    public List<ExamineeModel> queryChapterNumbe(String examinationId, String classId) {
        return examineeDao.queryChapterNumbe(classId, examinationId);
    }

    @Override
    public List<ExamineeModel> queryMeetConditionExaminnee(Date startTime, Date endTime) {
        return examineeDao.queryMeetConditionExaminnee(startTime, endTime);
    }

    @Override
    /**
     * 根据考生id和班级id查询学生章节具体分数
     *
     * @param classId
     * @param examId
     * @author a孙博雅
     * @sinces 2019年3月16日20:43:36
     */
    public List<ExaminationModel> querychapterscore(String classId, String examId, String examineeId) {
        List<ExaminationModel> examinationModels = examineeDao.querychapterscore(classId, examId, examineeId);
        return examinationModels;
    }

    public ExaminationModel selectTotalScore(String classId, String examId, String examineeId) {
        ExaminationModel examinationModels = examineeDao.selectTotalScore(classId, examId, examineeId);
        return examinationModels;
    }

    /**
     * 根据考试班级ID和考试ID分页查询考生
     *
     * @param classId
     * @param examId
     * @author 孙博雅
     * @since 2019年4月18日
     */
    @Override
    public List<ExaminationModel> queryPageExamineeByClassIdsby(String classId, String examId) {

        //查询成绩表该班级的考生
        List<ExaminationModel> examinationModelList = examineeDao.queryClassScore(classId, examId);
        return examinationModelList;
    }

    @Override
    public Integer queryStuInExam(String stuId, String examId) {
        return examineeDao.queryStuInExam(stuId, examId);
    }


}